import type { AxiosResponse } from "axios";

export type BaseResponse<T> = {
  result: number;
  errorInfo: string;
  statusCode: number;
  data: T; // 返回数据
};

export type Response<reqT, resT> = (
  params: reqT
) => Promise<AxiosResponse<BaseResponse<resT>>["data"]>;

export type Pick<T, U extends keyof T> = {
  [K in U]: T[K];
};

export type Extract<T, U> = T extends U ? never : T;

export type Omit<T, U extends keyof any> = Pick<T, Exclude<keyof T, U>>;
